/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package iffmyexp;

/**
 *
 * @author me
 */
import com.icesoft.faces.async.render.SessionRenderer;
import javax.faces.event.ActionEvent;

public class workflow {

    public static String workflow ;
    private String test = "test";
    private String thumb = "/resources/css-images/connect_idle.gif";


    public workflow() {
        SessionRenderer.addCurrentSession("wfSession");
    }


    public String getWorkflow() {
        return workflow;
    }

    public void setWorkflow(String workflow) {
        this.workflow = workflow;
        SessionRenderer.render("wfSession");
    }

    public String getTest() {
        return test;
    }

    public void setTest(String test) {
        this.test = test;
        SessionRenderer.render("wfSession");
    }

    public String getThumb() {
        return thumb;
    }

    public void setThumb(String thumb) {
        this.thumb = thumb;
        SessionRenderer.render("wfSession");
    }

    public void push(ActionEvent event) {

        Page2.outputText3.setValue("");
        workflowDetails.resetCount();
        Page2.valuesVis = false;
        search[] wfResArray = Page1.wfSearch;
        search wfRes = wfResArray[Page1.workflowsTable.getRowIndex()];
        workflow = wfRes.workflow;
        workflowDetails.getDetails();
        Page2.inputsTable.setValue(workflowDetails.getcurrInput());
        //test = workflowDetails.getInputs()[0];
        //workflow = Page1.workflowsTable.getRowIndex();
        thumb = workflowDetails.getThumb();
        SessionRenderer.render("wfSession");
    }

    public void decrement(ActionEvent event) {
        //System.out.println("look");
        Page2.compsVis = true;
        thumb = "/resources/css-images/connect_active.gif";
        SessionRenderer.render("wfSession");
        push(event);
    }
}
